Making progress…

For my friends and family that have been wondering what I’ve been working on these past months.

As we are nearing the roll-out our kick-starter campaign, I’m proud to finally be able to show-off something that my friends & I have been working so very hard to make a reality….

HAL2Arduino 0.5 – Released.

Happy Holidays everyone! 😀

With that said, I would like to introduce you to a new version of HAL2Arduino version 0.5.

Our shiny new version has added support for:

  • Quadrature encoders for precise position control.
  • PID Servo control. For fine grain tuning.
  • Basic Jog Wheel support.
  • Internal and/or external feedback support. Allows servos/steppers to auto-correct positional errors.

Improvements:

  • Faster PC-Host side script.
  • Lock-step synchronization between microcontroller clients.

In the pipe-line:

  • I2C support for mcp23017 IO expander chips. To allow up to 112 additional pins, per client. Very useful for matrix keypads.
  • Analog joystick input. Some people prefer these to jog wheels, especially scrap-bot builders.
  • User definable M-Codes. This will allow users to add special commands right in to their G-Code that can signal the microcontroller(s) to perform specific tasks. (Like ‘Brew Coffee’, ‘tweet when complete’ etc.)

Enjoy the holidays.

dewy721

Contributors: HAL2Arduino

Thanks to Alex for fixing an otherwise undiscovered typo in HAL2Arduino’s program.ino. 🙂

AccelStepper 1.32 library released.

During the evening while I was playing with an Arduino Due and troubleshooting some stepper movements, or rather the lack there of; I discovered a Due specific issue with pinMode() resetting pins back to the default LOW regardless of any previously assigned state. This small difference compared to AVR-based Arduinos threw a monkey wrench in to an otherwise standard test-bench setup.

In light of this, I got in touch with Mike McCauley the author of the AccelStepper library. Soon after we had hashed out the bug, and he quickly laid the matter to rest with a fresh, Due friendly version of the code.

So, if you have an Arduino Due and intend to use it with the AccelStepper library, I recommend you download an updated version.

HAL2Arduino 0.4 – preRelease

Well, after looking around for a good non-blocking multi-instance stepper library that has hooks I can exploit with input speeds from LinuxCNC (a very tall order) I found one that could do it. AccelStepper, so I put my coding hat on, brewed some coffee and banged out rough implementation of HAL2Arduino 0.4 (the preRelease version).

For those of you that have been waiting ever so patiently for the next generation of EMC2Arduino, here is the first version of HAL2Arduino that is actually useful to the average end-user.

This version has a couple of bug fixes:

  • Bi-directional communications fix. (Coding typo)
  • Init spam bug fixed.

Added features:

  • Support for plugin based mod files, for drag-n-drop/compile add on features.
  • Pre-compiler optimized code (modFiles too!) to keep the memory footprint lower, saving more room for your code. Unused code won’t be added to your final build.
  • Added “Green Light” signal so Arduino clients can synchronize with each other.

Added modFiles:

  • modAccelStepper: 0~9 axises of speed sensing motion control, default config is for 3-axis machine suitable for routers, plasma tables, basic mills, etc.
  • modLimSwitch: support for min/max/home switches, both physical and/or virtual (based on stepper positions).
  • modLcd: Updated to run on HAL2Arduino-0.4 (Still just a basic example of a DRO.)

In the pipeline:

modButtons: A control panel collection for the basics like E-Stop, start, stop, pause, step, etc.

Config LinuxCNC from Arduino. ie: Edit/upload HAL2Arduino to your arduino, run the host side python script and the custom.hal files get generated for you, based on the configuration of the arduino(s).

If you like, you may grab an early copy of it here.

Future thoughts

Playing with the compiler in the Arduino IDE, I realized that I could make setting up a new machine a LOT easier.

By making plugins/mods self loading on the Arduino side and on the PC host-side of things, perhaps with some luck I can make the background python script check and possibly auto-modify the custom.hal file on start up so that it will link/unlink halPins as requested by the one or more Arduinos in use.

So I made this post as a To Do List:

  1. Make mods self-loading via #ifdef
  2. Make HAL2Arduino.py  scan the custom.hal for used/unused pins and add/remove them. (Under its own section).
  3. Make a first-run virgin setup routine for the HAL2Arduino.py script. (Or just a simple install/uninstall script.)
  4. Speed tweaks. (Currently HAL2Arduino has an un-acceptibly high ~75ms latency.)

Like I said, this is a To Do List and right now I’m in college, so while this is planned; I’ll have to work on it when I can.

If anybody has feature requests, now would be a good time to suggest them.

HAL2Arduino 0.3 released.

Ok, per popular request I have uploaded the initial framework release of HAL2Arduino. I have a busy semester and my time is tight right now. It’s not going to run anything out of the box except until you mod it.

There is no readme file no doc’s just raw code. Play with it at your own risk!

You can read more about it here and download it here.

Finally, just to be clear… This code won’t run a CNC machine as is. It’s just a wiring breakout interface to expose LinuxCNC’s HAL interface pins to an Arduino. So one may easily add there own Arduino code to make or add on to an existing CNC machine.

Teachers, this would be a challenging project for students as the actual “make it move code” will need to be entered by the students.

Hack it, Branch it, Share it.

Taking a concensus:

With so many dimensions of expansion available, which way should we go next. Have a request? Vote!

Emc2Arduino 0.07b has been released.

I’m slowly working on adding new features as often as I can.

So far it features: (as of 0.06b)

  • 0~9 Axises of synchronous motion using non-blocking stepper motor control.
  • Full support for both virtual and physical limit switches. (Use ’em if you got ’em.)
  • Inputs for E-Stop, Power, Start, Stop, Pause, Resume and Program Step switches.
  • Software controllable microStepping down to 1/16th step.
  • Simple ASCII serial based control makes it usable for general robotics enthusiasts.

Features added just recently in 0.07b:

Outputs for:

  • Spindle controls; on/off, direction, RPM control.
  • Coolant control. Both flood and mist are supported.
  • Power Supply control.
  • Status indicators for E-Stop and Power. (More coming soon.)

In the pipeline:

  • LCD Support.
  • Encoder Support.
  • Jog Wheel & Joystick Support.
  • Arduino CNC swarm tactics. (Think LEGO-style CNC/Robotics!) Implemented in HAL2Arduino
  • Micro-builds. (Swarm) Implemented in HAL2Arduino

That’s all for the moment.

Emc2Arduino, How it begins…

After looking at RepRap, MakerBot, grbl and others. I found that while they were very cool projects by really clever people, they didn’t seem to have the features I was looking for in my CNC build.

I wanted to be able to use a real, full featured, CNC control software interface like the one LinuxCNC provides.

Since its open-source its totally free, and since its been around for a while its a very mature piece of software. Its even openGL accelerated.

Why not use it. The heavy coding is already done.

Its free. There’s tons of user support as well as guides out there on how to setup pretty much any CNC combo one can think of.

Perfect, now where do I begin? I thought, well I have an Arduino (or two) laying around here. A couple of tutorials to learn from.  Lets put something together. Thus Emc2Arduino was born.